﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class SanPhamTheoLoai : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        int madm=Convert.ToInt32( Request.QueryString["MaDM"].ToString());
        DataTable dt = Xulydulieu.ExecuteQuery("SELECT [MaSP], [TenSP], [MaDM], [Gia], [Hinh], [MieuTa] FROM [SanPham] WHERE ([MaDM] ="+madm+")");
        CollectionPager2.MaxPages = 10000;
        CollectionPager2.PageSize = 4;
        //CollectionPager1.DataSource = dt.Tables[0].DefaultView;
        CollectionPager2.DataSource = dt.DefaultView;
        CollectionPager2.BindToControl = dtlSanPham;
        dtlSanPham.DataSource = CollectionPager2.DataSourcePaged;
        dtlSanPham.DataBind();
 
    }

}